<template>
  <view v-if="shenheStatus == 0" class="chooseType">
    <view class="typeList">
      <view class="typeItem" @click="chooseType('SUBJECT_TYPE_INDIVIDUAL')">
        <view class="logo color1" src="">
          <text class="iconfont icon-store-fill"></text>
        </view>
        <view class="info">
          <text>{{ $t('salesman.individual') }}</text>
          <text>{{ $t('salesman.individualInfo') }}</text>
        </view>
        <text class="iconfont icon-arrow-right"></text>
      </view>
      <view class="typeItem" @click="chooseType('SUBJECT_TYPE_ENTERPRISE')">
        <view class="logo color2" src="">
          <text class="iconfont icon-company-fill"></text>
        </view>
        <view class="info">
          <text>{{ $t('salesman.subType2') }}</text>
          <text>{{ $t('salesman.busDetail') }}</text>
        </view>
        <text class="iconfont icon-arrow-right"></text>
      </view>
      <view class="typeItem" @click="chooseType('SUBJECT_TYPE_INSTITUTIONS')">
        <view class="logo color3" src="">
          <text class="iconfont icon-brand-fill"></text>
        </view>
        <view class="info">
          <text>{{ $t('salesman.subType3') }}</text>
          <text>{{ $t('salesman.government') }}</text>
        </view>
        <text class="iconfont icon-arrow-right"></text>
      </view>
      <view class="typeItem" @click="chooseType('SUBJECT_TYPE_OTHERS')">
        <view class="logo color4" src="">
          <text class="iconfont icon-tool-fill"></text>
        </view>
        <view class="info">
          <text>{{ $t('salesman.subType4') }}</text>
          <text>{{ $t('salesman.other') }}</text>
        </view>
        <text class="iconfont icon-arrow-right"></text>
      </view>
    </view>
  </view>
  <Shenhe v-else-if="shenheStatus == 1"></Shenhe>
</template>

<script>
import Shenhe from '@/components/shenhe/shenhe';
export default {
  components: { Shenhe },
  data() {
    return {
      id: 0,
    };
  },
  onLoad(o) {
    if (o.id) {
      // 已经申请过店铺
      this.id = o.id;
    }
    uni.removeStorageSync('application');
  },
  methods: {
    chooseType(e) {
      uni.navigateTo({
        url: '/salesman/application/application?id=' + this.id + '&type=' + e,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.typeList {
  padding-left: 30rpx;
  font-family: PingFang SC;
  color: #262626;
  .typeItem {
    padding: 40rpx 30rpx 40rpx 0;
    border-bottom: 1px solid #f8f8f8;
    display: flex;
    align-items: center;
    .logo {
      width: 80rpx;
      height: 80rpx;
      min-width: 80rpx;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      .iconfont {
        font-size: 54rpx;
        color: #fff;
      }
    }
    .color1 {
      background-color: #fbb13e;
    }
    .color2 {
      background-color: #31aafa;
    }
    .color3 {
      background-color: #754ccd;
    }
    .color4 {
      background-color: #38cbe8;
    }
    .info {
      margin: 0 46rpx 0 20rpx;
      display: flex;
      flex-direction: column;
      font-size: 28rpx;
      color: #8c8c8c;
      text:nth-child(1) {
        font-size: 32rpx;
        font-weight: 600;
        color: #262626;
        margin-bottom: 10rpx;
      }
    }
    .iconfont {
      font-size: 24rpx;
      color: #888;
    }
  }
}
</style>
